import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [{
    path: '/',
    name: 'Index',
    meta:{
      title:'爱企查'
    },
    component: () => import('@/views/Index')
  },
    {
      path: '/login',
      name: 'Login',
      component: () => import('@/views/Login')
    },
    {
      path: '/register',
      name: 'Register',
      component: () => import('@/views/Register')
    },
    {
      path: '/search',
      name: 'Search',
      component: () => import('@/views/Search')
    },
    {
      path: '/check',
      name: 'Check',
      component: () => import('@/views/Check')
    },{
      path: '/serve',
      name: 'Serve',
      component: () => import('@/views/Serve')
    },
    {
      path: '/vip',
      name: 'Vip',
      component: () => import('@/views/Vip')
    },{
      path: '/score',
      name: 'Score',
      component: () => import('@/views/Score')
    },{
      path: '/apply',
      name: 'Apply',
      component: () => import('@/views/Apply')
    },{
      path: '/maintain',
      name: 'maintain',
      component: () => import('@/views/maintain')
    },{
      path: '/consult',
      name: 'Consult',
      component: () => import('@/views/consult')
    }, {
      path: '/admin',
      name: 'AdminL',
      component: () => import('@/views/admin/Login')
    },{
      path: '/main',
      name: 'Admin',
      component: () => import('@/views/admin/Admin'),
      children : [
        {
          path : '/user',
          name : 'User',
          component : ()=> import('@/views/admin/User')
        }, {
          path : '/role',
          name : 'Role',
          component : ()=> import('@/views/admin/Role')
        }, {
          path : '/new',
          name : 'New',
          component : ()=> import('@/views/admin/New')
        }, {
          path : '/company',
          name : 'Company',
          component : ()=> import('@/views/admin/Company')
        },
      ]
    }
  ]
})
